home *** CD-ROM | disk | FTP | other *** search
- //---------------------------------------------------------------------------
- #include <vcl\vcl.h>
- #pragma hdrstop
- #include "fftmain.h"
- #include "form.h"
- #include "ViewUnit.h"
- //---------------------------------------------------------------------------
- #pragma resource "*.dfm"
- TMainForm *MainForm;
- float fftmain(long sample_rate, long fft_size, float freq);
-
- //---------------------------------------------------------------------------
- __fastcall TMainForm::TMainForm(TComponent* Owner)
- : TForm(Owner)
- {
- }
- //---------------------------------------------------------------------------
- void __fastcall TMainForm::ComputeClick(TObject *Sender)
- {
- float found_freq;
-
- found_freq=fftmain(StrToInt(SRateEdit->Text),StrToInt(FFTSizeEdit->Text),
- StrToFloat(FreqEdit->Text));
- FoundFreqLbl->Caption=FloatToStr(found_freq);
- ViewForm->Invalidate();
- }
- //---------------------------------------------------------------------------
- void __fastcall TMainForm::Button1Click(TObject *Sender)
- {
- Application->Terminate();
- }
- //---------------------------------------------------------------------------
- void __fastcall TMainForm::ViewBtnClick(TObject *Sender)
- {
- ViewForm->Show();
- }
- //---------------------------------------------------------------------------